package com.twu.biblioteca.view.utils;

import java.io.OutputStream;
import java.io.PrintStream;

/**
 * Created with IntelliJ IDEA.
 * User: cschlumb
 * Date: 22/08/2013
 * Time: 16:57
 * To change this template use File | Settings | File Templates.
 */
public class OutputSystem implements Output {

    private final PrintStream printStream;

    public OutputSystem(OutputStream outputStream) {
        this.printStream = new PrintStream(outputStream);
    }

    @Override
    public void write(String string) {
        printStream.println(string);
    }

    @Override
    public void write(int integer) {
        printStream.println(integer);
    }

    @Override
    public void write(Object object) {
        printStream.println(object.toString());
    }
}
